{% macro multi_input_row(name, label) %}
  {% if name not in USER_FIELDS_EXCLUDE %}
    {% for field in form[name] %}
    <tr id="row-{{ name }}-{{ loop.index0 }}">
      <td class="hcp-table-label">{% if loop.first %}<label>{{ label }}:</label>{% endif %}</td>
      <td class="hcp-table-data">
        {{ field }}
        <input type="button" tabindex="-1" class="hcp-button-delete" onclick="delete_field('{{ name }}', this)" {% if not loop.index0 and not loop.revindex0 %}style="display:none;"{% endif %}>
        <input type="button" tabindex="-1" class="hcp-button-add" onclick="add_field('{{ name }}')" {% if not loop.last %}style="display:none;"{% endif %}>
        {{ field.errors }}
      </td>
    </tr>
    {% endfor %}
  {% endif %}
{% endmacro %}

{% macro single_input_row(name, label) %}
  {% if name not in USER_FIELDS_EXCLUDE %}
    <tr id="row-{{ name }}-0">
      <td class="hcp-table-label"><label>{{ label }}:</label></td>
      <td class="hcp-table-data">
        {{ form[name] }}
        {{ form[name].errors }}
      </td>
    </tr>
  {% endif %}
{% endmacro %}

